package com.elvis.music.adapter;
///* ---------------------------------------------------------------------------------------------
// *
// *            Capital Alliance Software Confidential Proprietary
// *            (c) Copyright CAS 201{x}, All Rights Reserved
// *                          www.pekall.com
// *
// * ----------------------------------------------------------------------------------------------
// */
//package com.pekall.music.adapter;
//
//import java.util.List;
//
//import android.content.Context;
//import android.view.LayoutInflater;
//import android.view.View;
//import android.view.ViewGroup;
//import android.widget.BaseAdapter;
//import android.widget.CheckBox;
//import android.widget.CompoundButton;
//import android.widget.TextView;
//import android.widget.CompoundButton.OnCheckedChangeListener;
//
//import com.pekall.music.MusicApplication;
//import com.pekall.music.R;
//import com.pekall.music.model.Forder;
//
//public class ForderListAdapter extends BaseAdapter {
//
//    private List<Forder> sdPath;
//
//    private Context mContext;
//
//    public ForderListAdapter(Context context) {
//        mContext = context;
//        sdPath = MusicApplication.getInstance().getSdPath();
//    }
//
//    public int getCount() {
//        return sdPath.size();
//    }
//
//    public Object getItem(int position) {
//        return null;
//    }
//
//    public long getItemId(int position) {
//        return 0;
//    }
//
//    private TextView forderItem;
//
//    private CheckBox forderSelect;
//
//    public View getView(int position, View convertView, ViewGroup parent) {
//        if (convertView == null) {
//            convertView = LayoutInflater.from(mContext).inflate(R.layout.forderitem, null);
//        }
//        forderItem = (TextView) convertView.findViewById(R.id.forderpath);
//        forderItem.setText(sdPath.get(position).path);
//        forderSelect = (CheckBox) convertView.findViewById(R.id.forderselect);
//        forderSelect.setChecked(sdPath.get(position).isChecked);
//        forderSelect.setOnCheckedChangeListener( new MyCheckedChangeListener(position));
//        return convertView;
//    }
//    
//    public List<Forder> getForder(){
//        return sdPath;
//    }
//
//    class MyCheckedChangeListener implements OnCheckedChangeListener {
//
//        private int mPosition;
//
//        public MyCheckedChangeListener(int position) {
//            mPosition = position;
//        }
//
//        public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
//            System.out.println("onCheckedChanged"+mPosition+isChecked);
//            sdPath.get(mPosition).isChecked = isChecked;
//        }
//
//    }
//    
//
//}
